import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
import torch
from modules.xfeat import XFeat
from evaluation.dual_softmax_matcher import DualSoftMaxMatcher
from evaluation.xfeat.mega_F_est_mnn import MegaDepthFMNNBenchmark


if __name__ == "__main__":
    weight_path = "/media/liyuke/share/AAA/part2/xfeat/weights/xfeat.pt"
    model = XFeat(weights=weight_path)

    matcher = DualSoftMaxMatcher()
    mega_1500 = MegaDepthFMNNBenchmark()
    mega_1500.benchmark(descriptor_model=model, matcher_model=matcher)